#ifndef __MONKEY_SLIDE__MonkeyComponent__
#define __MONKEY_SLIDE__MonkeyComponent__

#include "cocos2d.h"
#include "Config.h"
#include "Monkey.h"
USING_NS_CC;

class MonkeyComponent : public CCComponent
{
	private:
		
		float __speed; // toc do chay cua con gian -> se tang theo Level
		virtual void update(float delta); // kiem tra tinh trang con chim va thuc hien hanh dong tuong ung....
		CCAction* curAction;//luu hanh dong hien tai de "stop" truoc khi thuc hien hanh dong ke tiep...

		CCSize sizeScreen;

		int m_move_up_count;
		int m_move1_left;

		CCMoveTo* actionMove;

	public:

		Monkey * parent;

		CCPoint oldpos;

		MonkeyComponent();
    
		void actionIdle(); // Trang thai bat dau cua con gian
		void actionRun(); // con gian chay khi duoc tap
		void actionDeath(); // con gian chet khi bi danh trung
		void actionStop(); // Ngung tat ca cac hoat dong trong Game
		// Tron thoat khong co action

		void fMonkeyMoveTo(CCPoint p);
		void fCallbacktemp(CCObject * object);
};
#endif